<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.6"/>
<title>Face Detection with Alignment: eHimage.h File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">Face Detection with Alignment
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.6 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>File&#160;Members</span></a></li>
    </ul>
  </div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Macros</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#nested-classes">Classes</a> &#124;
<a href="#typedef-members">Typedefs</a> &#124;
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">eHimage.h File Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>Basic image type and operations.  
<a href="#details">More...</a></p>
<div class="textblock"><code>#include &lt;stdlib.h&gt;</code><br/>
<code>#include &lt;string&gt;</code><br/>
<code>#include &quot;<a class="el" href="eHbox_8h_source.html">eHbox.h</a>&quot;</code><br/>
<code>#include &quot;<a class="el" href="eHbbox_8h_source.html">eHbbox.h</a>&quot;</code><br/>
</div>
<p><a href="eHimage_8h_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
Classes</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structeHimage.html">eHimage</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">Basic image data structure.  <a href="structeHimage.html#details">More...</a><br/></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="typedef-members"></a>
Typedefs</h2></td></tr>
<tr class="memitem:a6f19c025a891f54181de2a73fe16f42a"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a6f19c025a891f54181de2a73fe16f42a"></a>
typedef struct <a class="el" href="structeHimage.html">eHimage</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="eHimage_8h.html#a6f19c025a891f54181de2a73fe16f42a">image_t</a></td></tr>
<tr class="memdesc:a6f19c025a891f54181de2a73fe16f42a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Basic image data structure. <br/></td></tr>
<tr class="separator:a6f19c025a891f54181de2a73fe16f42a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae304fd15a69606760d7025f41427e3d8"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ae304fd15a69606760d7025f41427e3d8"></a>
typedef <a class="el" href="eHimage_8h.html#a6f19c025a891f54181de2a73fe16f42a">image_t</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="eHimage_8h.html#ae304fd15a69606760d7025f41427e3d8">image_ptr</a></td></tr>
<tr class="memdesc:ae304fd15a69606760d7025f41427e3d8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Pointer to image. <br/></td></tr>
<tr class="separator:ae304fd15a69606760d7025f41427e3d8"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:a261c244cf36d1f5c42065d0e9f5f5ed6"><td class="memItemLeft" align="right" valign="top"><a class="el" href="eHimage_8h.html#ae304fd15a69606760d7025f41427e3d8">image_ptr</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="eHimage_8h.html#a261c244cf36d1f5c42065d0e9f5f5ed6">image_alloc</a> (size_t sizy, size_t sizx, size_t nch=3)</td></tr>
<tr class="memdesc:a261c244cf36d1f5c42065d0e9f5f5ed6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Allocate a new image of size [sizy, sizx, nch].  <a href="#a261c244cf36d1f5c42065d0e9f5f5ed6">More...</a><br/></td></tr>
<tr class="separator:a261c244cf36d1f5c42065d0e9f5f5ed6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4da24162cd580ef2763026b3e981974f"><td class="memItemLeft" align="right" valign="top"><a class="el" href="eHimage_8h.html#ae304fd15a69606760d7025f41427e3d8">image_ptr</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="eHimage_8h.html#a4da24162cd580ef2763026b3e981974f">image_alloc</a> (size_t sizy, size_t sizx, size_t nch, const double *fillval)</td></tr>
<tr class="memdesc:a4da24162cd580ef2763026b3e981974f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Allocate a new image of size [sizy, sizx, nch], and initialize all pixel values to fill.  <a href="#a4da24162cd580ef2763026b3e981974f">More...</a><br/></td></tr>
<tr class="separator:a4da24162cd580ef2763026b3e981974f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7e87d5e4ab358be0d5bf2ee648d9ee2c"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="eHimage_8h.html#a7e87d5e4ab358be0d5bf2ee648d9ee2c">image_delete</a> (<a class="el" href="eHimage_8h.html#ae304fd15a69606760d7025f41427e3d8">image_ptr</a> img)</td></tr>
<tr class="memdesc:a7e87d5e4ab358be0d5bf2ee648d9ee2c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Delete image and associated memory.  <a href="#a7e87d5e4ab358be0d5bf2ee648d9ee2c">More...</a><br/></td></tr>
<tr class="separator:a7e87d5e4ab358be0d5bf2ee648d9ee2c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9d97a70868e2ba2958b23143e64f9201"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="eHimage_8h.html#a9d97a70868e2ba2958b23143e64f9201">image_fill</a> (<a class="el" href="eHimage_8h.html#ae304fd15a69606760d7025f41427e3d8">image_ptr</a> img, const double *val)</td></tr>
<tr class="memdesc:a9d97a70868e2ba2958b23143e64f9201"><td class="mdescLeft">&#160;</td><td class="mdescRight">Fill all pixels with same values.  <a href="#a9d97a70868e2ba2958b23143e64f9201">More...</a><br/></td></tr>
<tr class="separator:a9d97a70868e2ba2958b23143e64f9201"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9b760506fbf5548dd4e3715b5083e863"><td class="memItemLeft" align="right" valign="top"><a class="el" href="eHimage_8h.html#ae304fd15a69606760d7025f41427e3d8">image_ptr</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="eHimage_8h.html#a9b760506fbf5548dd4e3715b5083e863">image_readJPG</a> (const char *filename)</td></tr>
<tr class="memdesc:a9b760506fbf5548dd4e3715b5083e863"><td class="mdescLeft">&#160;</td><td class="mdescRight">Read Jpeg image file.  <a href="#a9b760506fbf5548dd4e3715b5083e863">More...</a><br/></td></tr>
<tr class="separator:a9b760506fbf5548dd4e3715b5083e863"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a014be865a1868dec62c6a796ef71810e"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="eHimage_8h.html#a014be865a1868dec62c6a796ef71810e">image_writeJPG</a> (const <a class="el" href="eHimage_8h.html#ae304fd15a69606760d7025f41427e3d8">image_ptr</a> img, const char *filename)</td></tr>
<tr class="memdesc:a014be865a1868dec62c6a796ef71810e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Write Jpeg image file.  <a href="#a014be865a1868dec62c6a796ef71810e">More...</a><br/></td></tr>
<tr class="separator:a014be865a1868dec62c6a796ef71810e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a77cd33d6390bf822b058eb7f25e43d6c"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="eHimage_8h.html#a77cd33d6390bf822b058eb7f25e43d6c">image_display</a> (const <a class="el" href="eHimage_8h.html#ae304fd15a69606760d7025f41427e3d8">image_ptr</a> img, const std::string &amp;winname)</td></tr>
<tr class="memdesc:a77cd33d6390bf822b058eb7f25e43d6c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Display an image.  <a href="#a77cd33d6390bf822b058eb7f25e43d6c">More...</a><br/></td></tr>
<tr class="separator:a77cd33d6390bf822b058eb7f25e43d6c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af0063d4ff4f21fd884270787bb469ecf"><td class="memItemLeft" align="right" valign="top"><a class="el" href="eHimage_8h.html#ae304fd15a69606760d7025f41427e3d8">image_ptr</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="eHimage_8h.html#af0063d4ff4f21fd884270787bb469ecf">image_subsample</a> (const <a class="el" href="eHimage_8h.html#ae304fd15a69606760d7025f41427e3d8">image_ptr</a> img, double scale)</td></tr>
<tr class="memdesc:af0063d4ff4f21fd884270787bb469ecf"><td class="mdescLeft">&#160;</td><td class="mdescRight">Fast image subsampling.  <a href="#af0063d4ff4f21fd884270787bb469ecf">More...</a><br/></td></tr>
<tr class="separator:af0063d4ff4f21fd884270787bb469ecf"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad385369b8994122799afb2d270e13f54"><td class="memItemLeft" align="right" valign="top"><a class="el" href="eHimage_8h.html#ae304fd15a69606760d7025f41427e3d8">image_ptr</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="eHimage_8h.html#ad385369b8994122799afb2d270e13f54">image_reduce</a> (const <a class="el" href="eHimage_8h.html#ae304fd15a69606760d7025f41427e3d8">image_ptr</a> img)</td></tr>
<tr class="memdesc:ad385369b8994122799afb2d270e13f54"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get an image half the size of input one.  <a href="#ad385369b8994122799afb2d270e13f54">More...</a><br/></td></tr>
<tr class="separator:ad385369b8994122799afb2d270e13f54"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae90c0aef6060a854178bd302a950cd87"><td class="memItemLeft" align="right" valign="top"><a class="el" href="eHimage_8h.html#ae304fd15a69606760d7025f41427e3d8">image_ptr</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="eHimage_8h.html#ae90c0aef6060a854178bd302a950cd87">image_resize</a> (const <a class="el" href="eHimage_8h.html#ae304fd15a69606760d7025f41427e3d8">image_ptr</a> img, double scale)</td></tr>
<tr class="memdesc:ae90c0aef6060a854178bd302a950cd87"><td class="mdescLeft">&#160;</td><td class="mdescRight">Resize an image using bilateral interpolation.  <a href="#ae90c0aef6060a854178bd302a950cd87">More...</a><br/></td></tr>
<tr class="separator:ae90c0aef6060a854178bd302a950cd87"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afaa0749505500e27056ecd3e9dd1ae1d"><td class="memItemLeft" align="right" valign="top"><a class="el" href="eHimage_8h.html#ae304fd15a69606760d7025f41427e3d8">image_ptr</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="eHimage_8h.html#afaa0749505500e27056ecd3e9dd1ae1d">image_crop</a> (const <a class="el" href="eHimage_8h.html#ae304fd15a69606760d7025f41427e3d8">image_ptr</a> img, <a class="el" href="eHbox_8h.html#a5a56d87a649d81945e96505ec76d6c54">fbox_t</a> crop, int *offset=NULL, bool shared=true)</td></tr>
<tr class="memdesc:afaa0749505500e27056ecd3e9dd1ae1d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Crop image This function can be used in two ways, either get shared data from original image, or allocate a new image, which is more expensive.  <a href="#afaa0749505500e27056ecd3e9dd1ae1d">More...</a><br/></td></tr>
<tr class="separator:afaa0749505500e27056ecd3e9dd1ae1d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8b0520a24e737cc7208edbe533951b5c"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="eHimage_8h.html#a8b0520a24e737cc7208edbe533951b5c">image_writeDetectionJpg</a> (const <a class="el" href="eHimage_8h.html#ae304fd15a69606760d7025f41427e3d8">image_ptr</a> img, const vector&lt; <a class="el" href="eHbbox_8h.html#abf0e2add76a0dd37cdac1cabc51c4812">bbox_t</a> &gt; boxes, const char *filename)</td></tr>
<tr class="memdesc:a8b0520a24e737cc7208edbe533951b5c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Write Jpg image with detected faces.  <a href="#a8b0520a24e737cc7208edbe533951b5c">More...</a><br/></td></tr>
<tr class="separator:a8b0520a24e737cc7208edbe533951b5c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a833d312fe8e414bbe2c79a02de548d68"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="eHimage_8h.html#a833d312fe8e414bbe2c79a02de548d68">image_writeDetectionXml</a> (const vector&lt; <a class="el" href="eHbbox_8h.html#abf0e2add76a0dd37cdac1cabc51c4812">bbox_t</a> &gt; boxes, const char *filename)</td></tr>
<tr class="memdesc:a833d312fe8e414bbe2c79a02de548d68"><td class="mdescLeft">&#160;</td><td class="mdescRight">Save detected faces in XML format.  <a href="#a833d312fe8e414bbe2c79a02de548d68">More...</a><br/></td></tr>
<tr class="separator:a833d312fe8e414bbe2c79a02de548d68"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0f26b43f04d0c7b86902114f0b6b3c6c"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="eHimage_8h.html#a0f26b43f04d0c7b86902114f0b6b3c6c">image_showDetection</a> (const <a class="el" href="eHimage_8h.html#ae304fd15a69606760d7025f41427e3d8">image_ptr</a> img, const vector&lt; <a class="el" href="eHbbox_8h.html#abf0e2add76a0dd37cdac1cabc51c4812">bbox_t</a> &gt; boxes, const std::string &amp;winname)</td></tr>
<tr class="memdesc:a0f26b43f04d0c7b86902114f0b6b3c6c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Show detection results on image and wait.  <a href="#a0f26b43f04d0c7b86902114f0b6b3c6c">More...</a><br/></td></tr>
<tr class="separator:a0f26b43f04d0c7b86902114f0b6b3c6c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a92eebfec853379102723c265a4d18970"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="eHimage_8h.html#a92eebfec853379102723c265a4d18970">image_showFaces</a> (const <a class="el" href="eHimage_8h.html#ae304fd15a69606760d7025f41427e3d8">image_ptr</a> img, const vector&lt; <a class="el" href="eHbbox_8h.html#abf0e2add76a0dd37cdac1cabc51c4812">bbox_t</a> &gt; boxes, const std::string &amp;winname)</td></tr>
<tr class="memdesc:a92eebfec853379102723c265a4d18970"><td class="mdescLeft">&#160;</td><td class="mdescRight">Show face detection results: face region, eyes, nose, mouth.  <a href="#a92eebfec853379102723c265a4d18970">More...</a><br/></td></tr>
<tr class="separator:a92eebfec853379102723c265a4d18970"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Basic image type and operations. </p>
<dl class="section note"><dt>Note</dt><dd>images are stored using column major style</dd></dl>
<dl class="section author"><dt>Author</dt><dd>Hang Su </dd></dl>
<dl class="section date"><dt>Date</dt><dd>2012-08-13 </dd></dl>
</div><h2 class="groupheader">Function Documentation</h2>
<a class="anchor" id="a261c244cf36d1f5c42065d0e9f5f5ed6"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="eHimage_8h.html#ae304fd15a69606760d7025f41427e3d8">image_ptr</a> image_alloc </td>
          <td>(</td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>sizy</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>sizx</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>nch</em> = <code>3</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Allocate a new image of size [sizy, sizx, nch]. </p>
<dl class="section return"><dt>Returns</dt><dd>pointer to the allocated image </dd></dl>
<dl class="section note"><dt>Note</dt><dd>Returned image is not initialized </dd></dl>

</div>
</div>
<a class="anchor" id="a4da24162cd580ef2763026b3e981974f"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="eHimage_8h.html#ae304fd15a69606760d7025f41427e3d8">image_ptr</a> image_alloc </td>
          <td>(</td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>sizy</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>sizx</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>nch</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const double *&#160;</td>
          <td class="paramname"><em>fillval</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Allocate a new image of size [sizy, sizx, nch], and initialize all pixel values to fill. </p>
<dl class="section return"><dt>Returns</dt><dd>pointer to the allocated image </dd></dl>

</div>
</div>
<a class="anchor" id="afaa0749505500e27056ecd3e9dd1ae1d"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="eHimage_8h.html#ae304fd15a69606760d7025f41427e3d8">image_ptr</a> image_crop </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="eHimage_8h.html#ae304fd15a69606760d7025f41427e3d8">image_ptr</a>&#160;</td>
          <td class="paramname"><em>img</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="eHbox_8h.html#a5a56d87a649d81945e96505ec76d6c54">fbox_t</a>&#160;</td>
          <td class="paramname"><em>crop</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int *&#160;</td>
          <td class="paramname"><em>offset</em> = <code>NULL</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>shared</em> = <code>true</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Crop image This function can be used in two ways, either get shared data from original image, or allocate a new image, which is more expensive. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">img</td><td>original image </td></tr>
    <tr><td class="paramname">crop</td><td>crop area within img </td></tr>
    <tr><td class="paramname">store</td><td>offset [offy offx] of the cropped patch inside image if not NULL </td></tr>
    <tr><td class="paramname">shared</td><td>indicate whether the result shares data with original image </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>cropped image patch, NULL if allocation failed </dd></dl>

</div>
</div>
<a class="anchor" id="a7e87d5e4ab358be0d5bf2ee648d9ee2c"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void image_delete </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="eHimage_8h.html#ae304fd15a69606760d7025f41427e3d8">image_ptr</a>&#160;</td>
          <td class="paramname"><em>img</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Delete image and associated memory. </p>
<dl class="section note"><dt>Note</dt><dd>If it's a shared image(the "child"), no data is destroyed; if the image that owns the data is deleted, all descendants are not accessible anymore </dd></dl>

</div>
</div>
<a class="anchor" id="a77cd33d6390bf822b058eb7f25e43d6c"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void image_display </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="eHimage_8h.html#ae304fd15a69606760d7025f41427e3d8">image_ptr</a>&#160;</td>
          <td class="paramname"><em>img</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>winname</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Display an image. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">img</td><td>the image to be displayed </td></tr>
    <tr><td class="paramname">winname</td><td>window name, also serves as the identifier of the window </td></tr>
  </table>
  </dd>
</dl>
<dl class="section note"><dt>Note</dt><dd>Requires opencv library: libopencv_core, libopencv_highgui </dd>
<dd>
If a window with the same name already exists, no new window is created </dd>
<dd>
windows need to be destroyed later, using cv::destroyWindow() </dd></dl>

</div>
</div>
<a class="anchor" id="a9d97a70868e2ba2958b23143e64f9201"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void image_fill </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="eHimage_8h.html#ae304fd15a69606760d7025f41427e3d8">image_ptr</a>&#160;</td>
          <td class="paramname"><em>img</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const double *&#160;</td>
          <td class="paramname"><em>val</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Fill all pixels with same values. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">img</td><td>target </td></tr>
    <tr><td class="paramname">val</td><td>value to be filled to each pixel, it should be at least the same length as img-&gt;nchannel </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a9b760506fbf5548dd4e3715b5083e863"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="eHimage_8h.html#ae304fd15a69606760d7025f41427e3d8">image_ptr</a> image_readJPG </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>filename</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Read Jpeg image file. </p>
<dl class="section return"><dt>Returns</dt><dd>pointer to allocatd image, NULL if failed </dd></dl>
<dl class="section note"><dt>Note</dt><dd>Requires opencv library: libopencv_core, libopencv_highgui </dd></dl>

</div>
</div>
<a class="anchor" id="ad385369b8994122799afb2d270e13f54"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="eHimage_8h.html#ae304fd15a69606760d7025f41427e3d8">image_ptr</a> image_reduce </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="eHimage_8h.html#ae304fd15a69606760d7025f41427e3d8">image_ptr</a>&#160;</td>
          <td class="paramname"><em>img</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get an image half the size of input one. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">img</td><td>the image to be reduced </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>reduced image </dd></dl>
<dl class="section note"><dt>Note</dt><dd>input image remains alive and unchanged </dd></dl>

</div>
</div>
<a class="anchor" id="ae90c0aef6060a854178bd302a950cd87"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="eHimage_8h.html#ae304fd15a69606760d7025f41427e3d8">image_ptr</a> image_resize </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="eHimage_8h.html#ae304fd15a69606760d7025f41427e3d8">image_ptr</a>&#160;</td>
          <td class="paramname"><em>img</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>scale</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Resize an image using bilateral interpolation. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">image</td><td>the image to be resized </td></tr>
    <tr><td class="paramname">scale</td><td>resizing scale </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>resized image </dd></dl>
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="eHimage_8h.html#af0063d4ff4f21fd884270787bb469ecf" title="Fast image subsampling. ">image_subsample()</a> </dd></dl>
<dl class="section note"><dt>Note</dt><dd>input image remains alive and unchanged </dd></dl>

</div>
</div>
<a class="anchor" id="a0f26b43f04d0c7b86902114f0b6b3c6c"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void image_showDetection </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="eHimage_8h.html#ae304fd15a69606760d7025f41427e3d8">image_ptr</a>&#160;</td>
          <td class="paramname"><em>img</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const vector&lt; <a class="el" href="eHbbox_8h.html#abf0e2add76a0dd37cdac1cabc51c4812">bbox_t</a> &gt;&#160;</td>
          <td class="paramname"><em>boxes</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>winname</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Show detection results on image and wait. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">img</td><td>detection target </td></tr>
    <tr><td class="paramname">boxes</td><td>detection results </td></tr>
    <tr><td class="paramname">winname</td><td>display window name, also serves as an identifier </td></tr>
  </table>
  </dd>
</dl>
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="eHimage_8h.html#a92eebfec853379102723c265a4d18970" title="Show face detection results: face region, eyes, nose, mouth. ">image_showFaces()</a> </dd></dl>

</div>
</div>
<a class="anchor" id="a92eebfec853379102723c265a4d18970"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void image_showFaces </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="eHimage_8h.html#ae304fd15a69606760d7025f41427e3d8">image_ptr</a>&#160;</td>
          <td class="paramname"><em>img</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const vector&lt; <a class="el" href="eHbbox_8h.html#abf0e2add76a0dd37cdac1cabc51c4812">bbox_t</a> &gt;&#160;</td>
          <td class="paramname"><em>boxes</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>winname</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Show face detection results: face region, eyes, nose, mouth. </p>
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="eHimage_8h.html#a0f26b43f04d0c7b86902114f0b6b3c6c" title="Show detection results on image and wait. ">image_showDetection()</a> </dd></dl>

</div>
</div>
<a class="anchor" id="af0063d4ff4f21fd884270787bb469ecf"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="eHimage_8h.html#ae304fd15a69606760d7025f41427e3d8">image_ptr</a> image_subsample </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="eHimage_8h.html#ae304fd15a69606760d7025f41427e3d8">image_ptr</a>&#160;</td>
          <td class="paramname"><em>img</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>scale</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Fast image subsampling. </p>
<p>Unlike <a class="el" href="eHimage_8h.html#ae90c0aef6060a854178bd302a950cd87" title="Resize an image using bilateral interpolation. ">image_resize()</a>, this function can only be used to down-scale an image, and focus more on anti-aliasing when building pyramid </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">img</td><td>the image to be subsampled </td></tr>
    <tr><td class="paramname">scale</td><td>subsample scale (&lt;1) </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>subsampleded image, or NULL if scale&gt;1 </dd></dl>
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="eHimage_8h.html#ae90c0aef6060a854178bd302a950cd87" title="Resize an image using bilateral interpolation. ">image_resize()</a> </dd></dl>
<dl class="section note"><dt>Note</dt><dd>input image remains alive and unchanged</dd>
<dd>
src image is not destroyed </dd></dl>

</div>
</div>
<a class="anchor" id="a8b0520a24e737cc7208edbe533951b5c"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void image_writeDetectionJpg </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="eHimage_8h.html#ae304fd15a69606760d7025f41427e3d8">image_ptr</a>&#160;</td>
          <td class="paramname"><em>img</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const vector&lt; <a class="el" href="eHbbox_8h.html#abf0e2add76a0dd37cdac1cabc51c4812">bbox_t</a> &gt;&#160;</td>
          <td class="paramname"><em>boxes</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>filename</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Write Jpg image with detected faces. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">img</td><td>detection target </td></tr>
    <tr><td class="paramname">boxes</td><td>detection results </td></tr>
    <tr><td class="paramname">filename</td><td>saving path </td></tr>
  </table>
  </dd>
</dl>
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="eHimage_8h.html#a833d312fe8e414bbe2c79a02de548d68" title="Save detected faces in XML format. ">image_writeDetectionXml()</a> </dd></dl>

</div>
</div>
<a class="anchor" id="a833d312fe8e414bbe2c79a02de548d68"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void image_writeDetectionXml </td>
          <td>(</td>
          <td class="paramtype">const vector&lt; <a class="el" href="eHbbox_8h.html#abf0e2add76a0dd37cdac1cabc51c4812">bbox_t</a> &gt;&#160;</td>
          <td class="paramname"><em>boxes</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>filename</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Save detected faces in XML format. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">boxes</td><td>detection results </td></tr>
    <tr><td class="paramname">filename</td><td>saving path </td></tr>
  </table>
  </dd>
</dl>
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="eHimage_8h.html#a8b0520a24e737cc7208edbe533951b5c" title="Write Jpg image with detected faces. ">image_writeDetectionJpg()</a> </dd></dl>

</div>
</div>
<a class="anchor" id="a014be865a1868dec62c6a796ef71810e"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void image_writeJPG </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="eHimage_8h.html#ae304fd15a69606760d7025f41427e3d8">image_ptr</a>&#160;</td>
          <td class="paramname"><em>img</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>filename</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Write Jpeg image file. </p>
<dl class="section note"><dt>Note</dt><dd>Requires opencv library: libopencv_core, libopencv_highgui </dd></dl>

</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Mon May 26 2014 22:18:57 for Face Detection with Alignment by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.6
</small></address>
</body>
</html>
